<?php

class MFormGlobal extends CI_Model{

	public function __construct()
	    {
	        parent::__construct();
	    }
    
    public function getButtonsAdd($url)
    {
        $form = '<button class="btn btn-primary" name="submit" type="submit">Save</button>';
        $form .= '<a href="/'. $url .'" class="btn link-cancel">Cancel</a>';
        return $form;   
    }
    
    public function getButtonsEdit($url_cancel, $url_delete)
    {
        $form = '<button class="btn btn-primary" name="submit" type="submit">Save</button>';
        $form .= '<a href="/'. $url_delete .'" class="btn link-delete">Delete</a>';
        $form .= '<a href="/'. $url_cancel .'" class="btn link-cancel">Cancel</a>';
        return $form;   
    }
    
    public function getButtonsEditDisableDel($url_cancel, $url_delete)
    {
        $form = '<button class="btn btn-primary" name="submit" type="submit">Save</button>';
        $form .= '<a href="/'. $url_delete .'" disabled="disabled" class="btn link-delete disable">Delete</a>';
        $form .= '<a href="/'. $url_cancel .'" class="btn link-cancel">Cancel</a>';
        return $form; 
    }
    
    public function getFormAdd($url_add){
    	$form = '<div align="right">												   						
				    <a href="'. $url_add .'" class="btn">
				        Add
				    </a>
			   </div>';
    	return $form;
    }
    
     public function getFormCancel($url_add){
    	$form = '<a href="/'. $url_add .'" class="btn btn-primary">Cancel</a>';
    	return $form;
    }
    
    public function getFormSaveCancel($url_cancel){
    	$form = '<div align="right">
				    <button type="submit" class="btn btn-primary">
				        Save
				    </button>												   						
				    <a href="'. $url_cancel .'" class="btn">
				        Cancel
				    </a>
			   </div>';
    	return $form;
    }
    
	public function getFormEditCancel($url_edit,$url_cancel){
    	$form = '<div align="right">
				    <a href="'. $url_edit .'" class="btn">
				        Save
				    </a>												   						
				    <a href="'. $url_cancel .'" class="btn">
				        Cancel
				    </a>
			    </div>';
    	return $form;
    }
    public function getFormSaveCancelBottom($url_cancel)
    {
        $form = '<div class="controls">
            <button type="submit" name="submit" value="submit" class="btn btn-primary">Save</button>
            <a href="'. $url_cancel .'" class="btn">Cancel</a></div>';
                      
        return $form;
    }
     
     public function getFormEditCancelBottom($url_cancel)
    {
        $form = '<div class="controls">
            <button type="submit" name="submit" value="submit" class="btn btn-primary">Edit</button>
            <a href="'. $url_cancel .'" class="btn">Cancel</a></div>';
                      
        return $form;
    }
    
}